<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/styleci.css" />
	<title>Caroline Chisholm Library</title>
	<link href="<?php echo base_url();?>assets/js/jquery-ui.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/custom.js"></script>
</head>


<body>
    <!-- ##################### Wrapper ######################### -->
    <div id="wrapper">

    <!-- ##################### Header ######################### -->
    <div id="header">
    <h1>Caroline Chisholm Library System</h1>
    </div> <!--### End Header ###-->
	
	<!-- ##################### Menu ######################### -->  
	<div id="menu">
    <ul>
		<li><?php echo anchor('public/intranet', 'Home'); ?></li>
		<li><?php echo anchor('public/intranet/manual', 'Manual'); ?></li>
		<li><?php echo anchor('public/intranet/help', 'Help'); ?></li>
		
		<?php
		// If a user is logged in, add admin and/or staff links
		if ( $this->session->userdata('CurrentUser') )
		{
			// Display 'Staff' link if they have staff prvileges
			if ( $this->session->userdata('CurrentUser')->staff_access )
				echo '<li>' . anchor('staff/staff', 'Staff') . '</li>';
				
			// Display 'Admin' link if they have admin prvileges
			if ( $this->session->userdata('CurrentUser')->admin_access )
				echo '<li>' . anchor('admin/admin', 'Admin') . '</li>';
				
			// Display 'Logout' link if they are logged in
			echo '<li>' . anchor('authenticate/logout', 'Logout') . '</li>';
		}
		
		// Otherwise display login link
		else
			echo '<li>' . anchor('authenticate/login', 'Login') . '</li>';
		?>
    </ul> 
	</div> <!--### End Menu ###-->
   
	<!-- ##################### Sidebar ######################### -->    
	<div id="sidebar">
		<?php echo $sidebar ?>
	</div><!--### End Sidebar ###-->

	<!-- ##################### Main Content ######################### -->
	<div id="main">
		<?php echo $main_content; ?>
	</div><!--### End Main Content ###-->
  
	
	<div class ="floatclr"></div>

	<!-- ##################### Footer ######################### --> 
  
	<div id="footer">
		<p class="textcol">Copyright - Caroline Chisholm Library (2011) - <?php echo anchor('public/intranet/privacyPolicy', 'Privacy Policy'); ?></p>
	</div><!--### End Footer ###-->
  
	</div><!--### End Wrapper ###-->
</body>
</html>